package com.cxf.windex.biz;

import com.cxf.windex.base.biz.BaseBiz;
import com.cxf.windex.entity.JsNotes;
import com.cxf.windex.entity.MoneyLog;
import com.cxf.windex.mapper.JsNotesMapper;
import com.github.pagehelper.PageHelper;
import org.apache.commons.lang3.StringUtils;
import org.springframework.stereotype.Service;
import tk.mybatis.mapper.entity.Example;

import java.util.List;

/**
 * @author chenxf
 * @date 3/15/2018
 * @description
 */
@Service
public class JsNotesBiz  extends BaseBiz<JsNotesMapper, JsNotes> {
    /**
     * 意见反馈列表
     *
     * @param limit 数量
     * @param offset 页码
     * @param orderStr  排序(升序或者降序)
     * @return
     */
    public List<JsNotes> list(int limit, int offset, String orderStr) {
        Example example = new Example(JsNotes.class);

        example.setOrderByClause("crt_time " + orderStr);
        PageHelper.startPage(offset, limit);
        return selectByExample(example);
    }
}
